package com.itheima.objectstream;

import com.itheima.domain.Student;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

/*
序列化流   写数据
反序列化流  读数据
 */
public class Demo01 {

    public static void main(String[] args) throws IOException {
        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("day13\\aaa\\student.txt"));
       // oos.write(97);
        Student cai = new Student("坤坤", 26);
        oos.writeObject(cai);
        oos.close();


    }
}
